package org.dromara.work.controller;

import java.util.List;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.lang.tree.Tree;
import jakarta.annotation.Resource;
import org.dromara.common.core.validate.QueryGroup;
import org.dromara.common.web.core.BaseController;
import org.dromara.work.domain.BaseDmlb;
import org.dromara.work.domain.bo.BaseDmlbBo;
import org.dromara.work.domain.vo.BaseDmlbVo;
import org.dromara.work.service.IBaseDmlbService;
import lombok.RequiredArgsConstructor;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.dromara.common.core.domain.R;


/**
 * 地名分类
 *
 * @author Chen
 * @date 2024-02-25
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/work/dm/lb")
public class BaseDmlbController extends BaseController {

    @Resource
    private final IBaseDmlbService iBaseDmlbService;


    /**
     * 查询测试树表列表
     */
    @SaCheckPermission("work:dmlb:list")
    @GetMapping("/list")
    public R<List<BaseDmlbVo>> list(@Validated(QueryGroup.class)BaseDmlbBo bo) {
        List<BaseDmlbVo> list = iBaseDmlbService.queryList(bo);
        return R.ok(list);
    }
}
